package com.buba.personnel.service.impl;

import com.buba.personnel.dao.UserInfoDao;
import com.buba.personnel.dao.UserStateDao;
import com.buba.personnel.service.UserInfoService;
import com.buba.pojo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired
    private UserInfoDao userInfoDao;
    @Override
    public long selUserInfoCount(Map<String, Object> map) {
        return userInfoDao.selUserInfoCount(map);
    }

    /**
     * 查询当前页的员工信息
     * @param map
     * @return
     */
    @Override
    public List<UserInfo> selUserInfo(Map<String, Object> map) {
        return userInfoDao.selUserInfo(map);
    }

    /**
     * 删除员工
     *
     * @param userInfoIds
     * @return
     */
    @Override
    public long delUserInfo(String[] userInfoIds) {
        return userInfoDao.delUserInfo(userInfoIds);
    }

    /**
     * 查询员工信息
     */
    @Override
    public List<UserInfo> selUserInfoAll() {
        return userInfoDao.selUserInfoAll();
    }

    /**
     * 批量添加员工信息
     *
     * @param list
     * @return
     */
    @Override
    public long addUserInfoAll(List<UserInfo> list) {
        return userInfoDao.addUserInfoAll(list);
    }
}
